﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using DAL.Service.admin;
using DAL.Service.admin.Impl;

namespace BIZ
{
    /// <summary>
    /// 后台用户操作类
    /// </summary>
    public class OperatorOper
    {
       static IOperatorService operService = new OperatorServiceImpl();
        public static IList getOperator(string workid, string pwd)
        {
            return operService.getOperator(workid, pwd);
        }

        public object save(object entity)
        {
            return operService.save(entity);
        }


        public int delete(string ids)
        {
            return operService.delete(ids);
        }

        public IList getOperatorbyid(int id)
        {
            return operService.getOperatorbyid(id);
        }


        public IList getOperator(int pageno, int pagesize)
        {
            return operService.getOperator(pageno, pagesize);
        }

        public int updatepwd(string pwd, int id)
        {
            return operService.updatepwd(pwd, id);
        }

        public bool getCountByWorkid(string workid,int id)
        {
            return operService.getCountByWorkid(workid,id) > 0 ? true : false;        
        }


        public bool getCountByRid(int rid)
        {
            return operService.getCountByRid(rid) > 0 ? true : false;
        }
    }
}
